<!-- $Id: article_list.htm 16783 2009-11-09 09:59:06Z liuhui $ -->



{if $full_page}

{include file="pageheader.htm"}

{insert_scripts files="../data/static/js/utils.js,./js/listtable.js"}



<div class="form-div">

<font style="color:red">

教程提醒：添加完成后，点击查看，可以在浏览器查看自己添加的页面。然后将链接进行OAUTH（认证服务号可以OAUTH）调用后，将链接填写到微信自定义菜单生成即可。

</font>

</div>

<form method="POST" action="article.php?act=batch_remove" name="listForm">

<!-- start cat list -->

<div class="list-div" id="listDiv">

{/if}



<table cellspacing='1' cellpadding='3' id='list-table'>

  <tr>

    <th><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">

      <a href="javascript:listTable.sort('article_id'); ">{$lang.article_id}</a>{$sort_article_id}</th>

    <th><a href="javascript:listTable.sort('title'); ">单品页面标题</a>{$sort_title}</th>



    <th><a href="javascript:listTable.sort('is_open'); ">是否可用</a>{$sort_is_open}</th>

    <th><a href="javascript:listTable.sort('add_time'); ">{$lang.add_time}</a>{$sort_add_time}</th>

    <th>{$lang.handler}</th>

  </tr>

  {foreach from=$article_list item=list}

  <tr>

    <td><span><input name="checkboxes[]" type="checkbox" value="{$list.article_id}" {if $list.cat_id <= 0 }disabled="true"{/if}/>{$list.article_id}</span></td>

    <td class="first-cell">

    <span onclick="javascript:listTable.edit(this, 'edit_title', {$list.article_id})">{$list.title|escape:html}</span></td>

    <td align="center">{if $list.cat_id > 0}<span>

    <img src="images/{if $list.is_open eq 1}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_show', {$list.article_id})" /></span>{else}<img src="images/yes.gif" alt="yes" />{/if}</td>

    <td align="center"><span>{$list.date}</span></td>

    <td align="center" nowrap="true"><span>

      <a href="../tuiguang.php?id={$list.article_id}" target="_blank" title="{$lang.view}"><img src="images/icon_view.gif" border="0" height="21" width="21" /></a>&nbsp;

      <a href="article_xkfla2015.php?act=edit&id={$list.article_id}" title="{$lang.edit}"><img src="images/icon_edit.gif" border="0" height="21" width="21" /></a>&nbsp;

     <!-- {if $list.cat_id > 0} --><a href="javascript:;" onclick="listTable.remove({$list.article_id}, '{$lang.drop_confirm}')" title="{$lang.remove}"><img src="images/icon_drop.gif" border="0" height="21" width="21"></a><!-- {/if} --></span>

    </td>

   </tr>

   {foreachelse}

    <tr><td class="no-records" colspan="10">没有任何单品页面</td></tr>

  {/foreach}

  <tr>&nbsp;

    <td align="right" nowrap="true" colspan="8">{include file="page.htm"}</td>

  </tr>

</table>



{if $full_page}

</div>



<div>

  <input type="hidden" name="act" value="batch" />

  <select name="type" id="selAction" onchange="changeAction()">

    <option value="">{$lang.select_please}</option>

    <option value="button_remove">{$lang.button_remove}</option>

    <option value="button_hide">{$lang.button_hide}</option>

    <option value="button_show">{$lang.button_show}</option>

    <option value="move_to">{$lang.move_to}</option>

  </select>

  <select name="target_cat" style="display:none">

    <option value="0">{$lang.select_please}</option>

    {$cat_select}

  </select>



  <input type="submit" value="{$lang.button_submit}" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />

</div>

</form>

<!-- end cat list -->

<script type="text/javascript" language="JavaScript">

  listTable.recordCount = {$record_count};

  listTable.pageCount = {$page_count};



  {foreach from=$filter item=item key=key}

  listTable.filter.{$key} = '{$item}';

  {/foreach}

  {literal}



  onload = function()

  {

    // 开始检查订单

    startCheckOrder();

  }

	/**

   * @param: bool ext 其他条件：用于转移分类

   */

  function confirmSubmit(frm, ext)

  {

      if (frm.elements['type'].value == 'button_remove')

      {

          return confirm(drop_confirm);

      }

      else if (frm.elements['type'].value == 'not_on_sale')

      {

          return confirm(batch_no_on_sale);

      }

      else if (frm.elements['type'].value == 'move_to')

      {

          ext = (ext == undefined) ? true : ext;

          return ext && frm.elements['target_cat'].value != 0;

      }

      else if (frm.elements['type'].value == '')

      {

          return false;

      }

      else

      {

          return true;

      }

  }

	 function changeAction()

  {

		

      var frm = document.forms['listForm'];



      // 切换分类列表的显示

      frm.elements['target_cat'].style.display = frm.elements['type'].value == 'move_to' ? '' : 'none';



      if (!document.getElementById('btnSubmit').disabled &&

          confirmSubmit(frm, false))

      {

          frm.submit();

      }

  }



 /* 搜索文章 */

 function searchArticle()

 {

    listTable.filter.keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);

    listTable.filter.cat_id = parseInt(document.forms['searchForm'].elements['cat_id'].value);

    listTable.filter.page = 1;

    listTable.loadList();

 }



 {/literal}

</script>

{include file="pagefooter.htm"}

{/if}

